﻿using System.Windows;

namespace DrawTools.Attach
{
    public static class IconFont
    {
        public static readonly DependencyProperty IconProperty = DependencyProperty.RegisterAttached("Icon", typeof(string), typeof(IconFont));

        public static void SetIcon(DependencyObject element, object value) => element.SetValue(IconProperty, value);

        public static string GetIcon(DependencyObject element) => ((string)element.GetValue(IconProperty)).Replace(@"&#x", @"\u").Replace(";", "");
    }
}
